package com.lgl.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface ISqlSession {
    //查询所有
    public <E> List<E> selectList(String statementId, Object... params) throws InvocationTargetException, SQLException, InstantiationException, IllegalAccessException, NoSuchFieldException, IntrospectionException, ClassNotFoundException;

    //根据条件查询单个
    public <T> T selectOne(String statementId, Object... params) throws SQLException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, IntrospectionException, ClassNotFoundException;

    //为Dao接口生成代理实现类
    public <T> T getMapper(Class<?> mapperClass);

    //更新
    public int update(String statementId, Object... params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;
}
